Skip to content

persist: log full error chain for indeterminate compare_and_append er… - #37901

Merged
peterdukelarsen merged 1 commit into
MaterializeInc:mainfrom
peterdukelarsen:pl/persist-log-error-causes
Aug 17, 2026
Merged

persist: log full error chain for indeterminate compare_and_append er…#37901
peterdukelarsen merged 1 commit into
MaterializeInc:mainfrom
peterdukelarsen:pl/persist-log-error-causes

Conversation

@peterdukelarsen

Copy link
Copy Markdown
Contributor

Motivation

Unable to see detailed error about why persist failed to compare_and_append.

"compare_and_append received an indeterminate error, retrying in 16s: indeterminate: db error"

Description

Format with display_with_causes(), matching retry_external, so the cause chain reaches the log line.

Verification

…rors

The compare_and_append retry loop logged the Indeterminate error with
its plain Display. A tokio_postgres error renders as just "db error"
there, because the underlying DbError (SQLSTATE, message, detail, hint)
is only reachable through the source chain. Format with
display_with_causes(), matching retry_external, so the cause chain
reaches the log line.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@peterdukelarsen
peterdukelarsen requested a review from a team as a code owner July 27, 2026 21:46
@peterdukelarsen
peterdukelarsen merged commit 0c5d22e into MaterializeInc:main Aug 17, 2026
125 checks passed
@peterdukelarsen
peterdukelarsen deleted the pl/persist-log-error-causes branch August 17, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants